﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BookForm.cls
{
    class Variant
    {

        private Variant()
        {
        }
        private static string _Err = "";
        public static string Err
        {
            get { return _Err; }
            set { _Err = value; }
        }

        public static System.Text.Encoding encoding = System.Text.Encoding.UTF8;
        //public static System.Text.Encoding encoding
        //{
        //    get { return _encoding; }
        //    set { _encoding = value; }
        //}

        //private static Room _CurrentRoom;
        //public static Room CurrentRoom
        //{
        //    get
        //    {
        //        return _CurrentRoom;
        //    }
        //    set
        //    {
        //        _CurrentRoom = value;
        //    }

        //}

        private static User _CurrentUser;
        public static User CurrentUser
        {
            get
            {
                if (_CurrentUser == null)
                {
                    _CurrentUser = new User();
                }
                return _CurrentUser;
            }
            set
            {
                _CurrentUser = value;

                //Functions.DelegateFunc.OnLogin();
            }

        }

        //private static frmCSDNReader _MainForm;
        //public static frmCSDNReader MainForm
        //{
        //    get
        //    {
        //        return _MainForm;
        //    }
        //    set
        //    {
        //        _MainForm = value;

        //    }

        //}

        public static string UserFileName
        {
            get
            {
                return System.Windows.Forms.Application.StartupPath.Replace(@"\", @"\\") + @"\\52mtguser.dat";
            }

        }
    }
}
